package com.srit.system.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.srit.system.bean.Grid;
import com.srit.system.service.GridService;

/**
 * @author guan
 * 
 */
@Controller
public class GridController {
	@Autowired
	private GridService gridService;

	@RequestMapping(value = "/grid-saveOrUpdate")
	public String saveOrUpdate(Grid grid, @RequestParam int pageConfigId) {
		System.out.println(grid);
		gridService.save(grid);
		return "redirect:/pageConfig-edit?id=" + pageConfigId;
	}

}
